function Point(x,y)
{
	this.x=x;
	this.y=y;
}

function Size(width,height)
{
	this.width=width;
	this.height=height;
}

function Rect(point,size)
{
	this.x=point.x;
	this.y=point.y;
	this.width=size.width;
	this.height=size.height;
}

function createDOMByString(html){
//	var wrap=document.createDocumentFragment();//not work
	var wrap=document.createElement("div");
	wrap.innerHTML=html;
	var childNodes=wrap.childNodes;
	return childNodes.length==1?childNodes[0]:childNodes;
}

function Trim(str){
	return str.replace(/(^\s*)|(\s*$)/g, "");
}
/*
function RawWebSocket(srvUrl){
	this.srvUrl = srvUrl;
//'ws://dev.xantus.org' 
//"ws://example.com/" 
//'ws://localhost:8888'
//	this.init();
}

RawWebSocket.prototype={
	init:function(){
		var self=this;
		var WS=("MozWebSocket" in window) ? window.MozWebSocket : window.WebSocket;
		if(!WS){
			this.onError&&this.onError("Your browser do not support WebSocket, please update your browser!");
			return false;
		}
		
		this.ws = new WS(this.srvUrl);
		if(!this.ws){
			this.onError&&this.onError("Create WebSocket failed!");
			return false;
		}
		
		this.ws.onerror = function(){
			self.onError&&self.onError();
		},
		
		this.ws.onopen = function(){
			self.onOpen&&self.onOpen();
		};
	 
		this.ws.onmessage = function(e){
			self.onRecv&&self.onRecv(e.data);
		};
	 
		this.ws.onclose = function(){
			self.onClose&&self.onClose();
		};
		
		return true;
	},
	
	//return:true/false
	send:function(text){
		if(this.ws.readyState==this.ws.CONNECTING)return false;//send when readyState==CONNECTING will rise a exception.
		return this.ws.send(text);
	},
	
	close:function(){
		this.ws.close();
	}
}
*/